const path = require('path');

module.exports = {
    //path.resolve()方法将路径或路径片段的序列解析为绝对路径 
    // eg:                     __dirname： E:\mine\webpack\mine-node-cli\mine-node-cli-create\config
    // path.resolve(__dirname, '../src')： E:\mine\webpack\mine-node-cli\mine-node-cli-create\src
    context: path.resolve(__dirname, '../src'),
    entry: './demo/index.js',
    output: {
        filename: '[name].bundle.js',
        // process.cwd() 和 __dirname
        path: path.resolve(process.cwd(), 'dist')
    }
}